ifndef $(CROSS-BULID)
export CROSS-BULID = arm-linux-
endif

CC := ${CROSS-BULID}gcc
AR := ${CROSS-BULID}ar

CFLAGS := -Wall -Werror -O2

# get soures list of current path
GPIO_FILES = $(wildcard *.c)  
# generate obj list   
GPIO_OBJ = $(GPIO_FILES:.c=.o)
# define lib name
GPIO_LIB := gpioctl

staticlib : $(GPIO_OBJ)
	$(AR) rcs lib$(GPIO_LIB).a $^
    
clean:  
	$(RM) $(GPIO_OBJ)